package com.dragon.modules.yuegou.query.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.system.UniappOpenidRefEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * uniapp openid 手机号 关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-11-09 11:09:28
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class UniappOpenidRefQuery extends UniappOpenidRefEntity implements Query<UniappOpenidRefEntity> {


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 绑定的手机号码查询条件 */
	@JsonUnwrapped(prefix = "mobile")
	private Condition<String> mobileCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "uniappOpenId")
	private Condition<String> uniappOpenIdCondition;

    /** 第三方 appid查询条件 */
	@JsonUnwrapped(prefix = "appid")
	private Condition<String> appidCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public UniappOpenidRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public UniappOpenidRefQuery(UniappOpenidRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public UniappOpenidRefQuery(UniappOpenidRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.mobileCondition != null) {
			this.mobileCondition = other.mobileCondition.copy();
		}
		if(other.uniappOpenIdCondition != null) {
			this.uniappOpenIdCondition = other.uniappOpenIdCondition.copy();
		}
		if(other.appidCondition != null) {
			this.appidCondition = other.appidCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<UniappOpenidRefEntity> toQueryWrapper() {
		QueryWrapper<UniappOpenidRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (mobileCondition != null) {
			mobileCondition.toWrapper(wrapper, COL_MOBILE);
		}
		if (uniappOpenIdCondition != null) {
			uniappOpenIdCondition.toWrapper(wrapper, COL_UNIAPP_OPEN_ID);
		}
		if (appidCondition != null) {
			appidCondition.toWrapper(wrapper, COL_APPID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回绑定的手机号码查询条件
	 * 
	 * @return mobileCondition 绑定的手机号码查询条件
	 */
	public Condition<String> mobile() {
		this.mobileCondition = new Condition<>();
		return this.mobileCondition;
	}
	
	/**
	 * 获取绑定的手机号码查询条件
	 * 
	 * @return mobileCondition 绑定的手机号码查询条件
	 */
	public Condition<String> getMobileCondition() {
		return mobileCondition;
	}

	/**
	 * 设置绑定的手机号码查询条件
	 * 
	 * @param mobileCondition 绑定的手机号码查询条件
	 */
	public void setMobileCondition(Condition<String> mobileCondition) {
		this.mobileCondition = mobileCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return uniappOpenIdCondition 查询条件
	 */
	public Condition<String> uniappOpenId() {
		this.uniappOpenIdCondition = new Condition<>();
		return this.uniappOpenIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return uniappOpenIdCondition 查询条件
	 */
	public Condition<String> getUniappOpenIdCondition() {
		return uniappOpenIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param uniappOpenIdCondition 查询条件
	 */
	public void setUniappOpenIdCondition(Condition<String> uniappOpenIdCondition) {
		this.uniappOpenIdCondition = uniappOpenIdCondition;
	}

	/**
	 * 构造并返回第三方 appid查询条件
	 * 
	 * @return appidCondition 第三方 appid查询条件
	 */
	public Condition<String> appid() {
		this.appidCondition = new Condition<>();
		return this.appidCondition;
	}
	
	/**
	 * 获取第三方 appid查询条件
	 * 
	 * @return appidCondition 第三方 appid查询条件
	 */
	public Condition<String> getAppidCondition() {
		return appidCondition;
	}

	/**
	 * 设置第三方 appid查询条件
	 * 
	 * @param appidCondition 第三方 appid查询条件
	 */
	public void setAppidCondition(Condition<String> appidCondition) {
		this.appidCondition = appidCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
